{% for rec in recs%}
<div class="clearfix"></div>
<div id="{{ rec.uid }}">
    <div class="reply_list">
        <div class="row">

            <div class="col-sm-12">
                <div class="reply_title">
                    <div style="width: 30px;height: 30px" class="pull-left">{% module user_profile_by_id(rec.user_id) %}</div>&nbsp;&nbsp; <strong>{{ rec.user_name }}</strong>

<span class="pull-right"><span class="glyphicon glyphicon-time"></span>
                 {{ str(rec.date).split('.')[0] }}</span>
                </div>
                <div class="reply_cnt">
                    <div class="listinfo_content" id="comment_id{{ rec.uid }}"> {% raw unescape(rec.cnt_html) %}
                    <div class="reply_button pull-right">
{#                        {% if userinfo and userinfo.uid == rec.user_id %}#}
{#                        <button class="btn btn-xs btn-warning" data-toggle="modal" data-target="#myModal{{rec.uid}}">#}
{#                            <span class="glyphicon glyphicon-pencil"></span>#}
{#                            &nbsp;{{ _('Modify') }}#}
{#                        </button>#}
{#                        {% end %}#}

                    </div>


             </div>
                    <div>
                        {% if (userinfo is None) or ( (userinfo) and ( userinfo.uid == rec.user_id )) %}
                        <span class="glyphicon glyphicon-thumbs-up"></span>
                        {% else %}
                        <span class="glyphicon glyphicon-thumbs-up" id="zan_text"
                              onclick="reply_zan('{{ rec.uid }}');" style="cursor: pointer"></span>
                        {% end %}
                        <span style="color: #f00" id="text_zan_{{ rec.uid }}">{{ rec.vote }}</span>
                         {% if userinfo and ( (userinfo.uid == rec.user_id) or (userinfo.extinfo.get('_per_assign_role', 0) == 1)) %}
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <button class="btn btn-xs btn-danger"
                                onclick="reply_del_com('{{ rec.uid }}');">
                            <span class=" glyphicon glyphicon-trash"></span>
                            {{ _('Delete') }}
                        </button>
                        {% end %}
                    </div>
                </div>

            </div>
        </div>
    </div>
        <div class="modal fade" id="myModal{{rec.uid}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="myModalLabel">{% if en %}Modify Comment{% else %} 修改评论 {% end %}</h4>
                    </div>
                    <div class="modal-body">
                        <form method="post" class="form-horizontal" id="reply_modify_form">
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <h5 class="red"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;
                                        {% if en %}
                                        {{ _('Support for MarkDown syntax ') }}( {{ _(' at least 10 characters ') }})
                                        {% else %}
                                        支持MarkDown语法（最少10个字符）
                                        {% end %}

                                    </h5>

                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-10">
                                <textarea rows="5" name="cnt_modify_reply{{rec.uid}}" id="cnt_modify_reply{{rec.uid}}"
                                          class="form-control">
                                    {% module replycnt(replyid = rec.uid) %}
                                </textarea>
                                </div>
                            </div>
                            <button type="button" class="btn btn-default btn-xs" data-dismiss="modal">Close</button>
                            <a onclick="reply_modify('{{rec.uid}}','cnt_modify_reply{{rec.uid}}','1');" data-dismiss="modal"
                               class="btn btn-primary btn-xs">{{ _('Submit') }}</a>
                        </form>

                    </div>


                </div>
            </div>
        </div>

</div>

{% end %}